Refresh.Web.BrowserInfo = {
	init: function() {
		var d = window.document;
		var a = navigator.appVersion.toLowerCase();
		var n = navigator.appName.toLowerCase();
		var u = navigator.userAgent.toLowerCase();
		var v = 0;
		
		// has contentEditable properties
		this.isRich = false;
				
		// OS
		this.isMac= (a.indexOf('mac') != -1);
		this.isWin= ( ( (a.indexOf('win')!=-1) || (a.indexOf('nt')!=-1) ) && !this.isMac);
		this.isLinux = (a.indexOf('linux')!=-1);
		this.isiPhone = (a.indexOf('iphone')!=-1);

		// Browser
		this.isOpera = ( u.indexOf( 'opera' ) != -1 );
		this.isIE = (a.indexOf('msie') != -1 && !this.isOpera);
		this.isKonq = ( u.indexOf( 'konqueror' ) != -1 );
		this.isSafari = ( u.indexOf( 'safari' ) != -1 );
		this.isSafari2 = this.isSafari3 = false;
		this.isGecko = ( u.indexOf( 'gecko' ) != -1 && !this.isSafari && !this.isKonq);

		// richness
		if (this.isIE && !this.isMac) {
			v = a.substring(a.indexOf("msie") + 5, a.indexOf(";", a.indexOf("msie")) );
			
			if (parseFloat(v) > 5.5) this.isRich = true;
			
		} else if (this.isGecko) {

			v = u.substring(u.indexOf("gecko/") + 6 );
			v = v.substring(v, v.indexOf(" "));
			
			if (parseFloat(v) > 20030624) this.isRich = true;
		
		} else if (this.isOpera) {
			
			v = u.substring(u.indexOf('opera/') + 6);
			
			if (parseFloat(v) >= 9.0) this.isRich = true;
		
		} else if (this.isSafari) {
			v = u.substring(u.indexOf("safari/") + 7 );
			
			if (parseFloat(v) >= 312 && !this.isiPhone) this.isRich = true;
			
			
			if (u.indexOf('version/3') != -1) {
				this.isSafari3 = true;
				this.isSafari2 = false;
			} else {
				this.isSafari2 = true;
				this.isSafari3 = false;	
				
			}
	
		}
		
	}
};
Refresh.Web.BrowserInfo.init();